package com.yiwei.hdb.model;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by xsooy-pc on 18-7-10.
 */

public class DealBeforeV3Model extends ResponseModel implements Parcelable {

    /**
     * data : {"step":1,"uplists":[{"id":1,"name":"学籍认证","remark":"xuexin"},"... ..."]}
     */

    public DataBean data;

    public static class DataBean implements Parcelable {
        /**
         * step : 1
         * uplists : [{"id":1,"name":"学籍认证","remark":"xuexin"},"... ..."]
         */

        public int step;
        public ArrayList<UplistsBean> uplists;

        public static class UplistsBean implements Parcelable {
            /**
             * id : 1
             * name : 学籍认证
             * remark : xuexin
             */

            public String id;
            public String name;
            public String remark;

            @Override
            public int describeContents() {
                return 0;
            }

            @Override
            public void writeToParcel(Parcel dest, int flags) {
                dest.writeString(this.id);
                dest.writeString(this.name);
                dest.writeString(this.remark);
            }

            public UplistsBean() {
            }

            protected UplistsBean(Parcel in) {
                this.id = in.readString();
                this.name = in.readString();
                this.remark = in.readString();
            }

            public static final Creator<UplistsBean> CREATOR = new Creator<UplistsBean>() {
                @Override
                public UplistsBean createFromParcel(Parcel source) {
                    return new UplistsBean(source);
                }

                @Override
                public UplistsBean[] newArray(int size) {
                    return new UplistsBean[size];
                }
            };
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeInt(this.step);
            dest.writeList(this.uplists);
        }

        public DataBean() {
        }

        protected DataBean(Parcel in) {
            this.step = in.readInt();
            this.uplists = new ArrayList<UplistsBean>();
            in.readList(this.uplists, UplistsBean.class.getClassLoader());
        }

        public static final Creator<DataBean> CREATOR = new Creator<DataBean>() {
            @Override
            public DataBean createFromParcel(Parcel source) {
                return new DataBean(source);
            }

            @Override
            public DataBean[] newArray(int size) {
                return new DataBean[size];
            }
        };
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeParcelable(this.data, flags);
    }

    public DealBeforeV3Model() {
    }

    protected DealBeforeV3Model(Parcel in) {
        this.data = in.readParcelable(DataBean.class.getClassLoader());
    }

    public static final Parcelable.Creator<DealBeforeV3Model> CREATOR = new Parcelable.Creator<DealBeforeV3Model>() {
        @Override
        public DealBeforeV3Model createFromParcel(Parcel source) {
            return new DealBeforeV3Model(source);
        }

        @Override
        public DealBeforeV3Model[] newArray(int size) {
            return new DealBeforeV3Model[size];
        }
    };
}
